Using PS4 Control Pads via Bluetooth

Requirements

  • A compatible Bluetooth 2.1+ USB adapter
  • At least one official Sony PlayStation 4 control pad

Overview

At present pairing a Sony PlayStation 4 control pad with PES requires some manual steps at the command line. However, once paired you will not have to perform these steps again. I hope to automate this process in the future.

Note

Proceeding to use this method will mean that you will not be able to use Sony PlayStation 3 control pads with the QtSixA daemon and automatic pairing of these control pads will not work anymore. However, you can use Sony PlayStation 3 control pads along with Sony PlayStation 4 control pads if you also use Bluez with them too. See Using Bluez instead of QtSixA for more information.

Disable sixad

  1. Log into your Raspberry Pi either via SSH or using a keyboard at the console.
  2. Stop the sixad daemon:
sudo systemctl stop sixad.service
  1. Disable/enable services:
sudo systemctl disable sixad.service
sudo systemctl enable bluetooth.service
  1. Power off the system and disconnect the power cable - do not reboot:
sudo poweroff
  1. Power on the system (reconnect power cable).

Pairing using bluetoothctl

  1. Log back into your Raspberry Pi either via SSH or using a keyboard at the console.
  2. Run the bluetoothctl command as a normal user, i.e.
bluetoothctl
  1. At the bluetoothctl prompt type the following commands:
agent on
default-agent
power on
discoverable on
pairable on
scan on

Example output can be found below:

[pi@pes ~]$ bluetoothctl
[NEW] Controller 00:15:XX:XX:XX:XX pes [default]
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 00:15:XX:XX:XX:XX Discoverable: yes
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
Discovery started
  1. Now put your Sony PlayStation 4 control pad into pairable mode by holding down the Share and PlayStation buttons until the light bar on the control pad flashes yellow. After a few seconds you should see at the bluetoothctl prompt that your control pad has been discovered, e.g.
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:15:XX:XX:XX:XX Discovering: yes
[NEW] Device 00:3C:XX:XX:XX:XX 00-3C-XX-XX-XX-XX
[NEW] Device 1C:66:XX:XX:XX:XX 1C-66-XX-XX-XX-XX
[CHG] Device 1C:66:XX:XX:XX:XX LegacyPairing: no
[CHG] Device 1C:66:XX:XX:XX:XX Name: Wireless Controller
[CHG] Device 1C:66:XX:XX:XX:XX Alias: Wireless Controller
[CHG] Device 1C:66:XX:XX:XX:XX LegacyPairing: yes
[CHG] Device 1C:66:XX:XX:XX:XX Class: 0x002508
[CHG] Device 1C:66:XX:XX:XX:XX Icon: input-gaming

Take a note of the Bluetooth MAC address shown for “Wireless Controller”, e.g. 1C:66:XX:XX:XX:XX in my case.

  1. Now type:
pair MAC

where MAC is the MAC address of your control pad and when prompted enter 0000 as the PIN, for example:

[bluetooth]# pair 1C:66:XX:XX:XX:XX
Attempting to pair with 1C:66:XX:XX:XX:XX
[CHG] Device 1C:66:XX:XX:XX:XX Connected: yes
Request PIN code
[agent] Enter PIN code: 0000
[CHG] Device 1C:66:XX:XX:XX:XX Modalias: usb:v054Cp05C4d0100
[CHG] Device 1C:66:XX:XX:XX:XX UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 1C:66:XX:XX:XX:XX UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 1C:66:XX:XX:XX:XX Paired: yes
Pairing successful
[CHG] Device 1C:66:XX:XX:XX:XX Connected: no
  1. Next we must trust the control pad by running:
trust MAC

where MAC is the MAC address of your control pad, for example:

[bluetooth]# trust 1C:66:XX:XX:XX:XX
[CHG] Device 1C:66:XX:XX:XX:XX Trusted: yes
Changing 1C:66:XX:XX:XX:XX trust succeeded
  1. Finally, run the following command to connect to the control pad:

where MAC is the MAC address of your control pad, for example:

[bluetooth]# connect 1C:66:XX:XX:XX:XX
Attempting to connect to 1C:66:XX:XX:XX:XX
[CHG] Device 1C:66:XX:XX:XX:XX Connected: yes
Connection successful
  1. Repeat for any additional control pads

Then type quit to exit back to the command prompt. You should now see that the light bar on your control pad is blue and if you have the PES GUI loaded, it should automatically recognise your control pad.